{extend name="layout" /}
{block name="content"}
<div class="search-box row">
    <form action="" method="post">
        <div class="col-md-8">
            <!--<div class="form-group">-->
                <!--<span class="pull-left form-span">订单状态:</span>-->
                <!--<select class="form-control" name="status">-->
                    <!--<option value="0">全部</option>-->
                    <!--<option value="1" <eq name="status" value="1">selected</eq>>待发货</option>-->
                    <!--<option value="2" <eq name="status" value="2">selected</eq>>已发货</option>-->
                <!--</select>-->
            <!--</div>-->
            <div class="form-group">
                <span class="pull-left form-span">姓名:</span>
                <input type="text" class="form-control" style="width:160px;" placeholder="选择时间" name="name" value="{$name?:''}" readonly>
            </div>
            <div class="form-group">
                <span class="pull-left form-span">身份证号:</span>
                <input type="text" class="form-control" style="width:160px;" placeholder="选择时间" name="card" oninput="value=value.replace(/[^0-9]/g,'')" value="{$card?:''}" readonly>
            </div>
            <div class="form-group btn-search">
                <button class="btn btn-default" ><span class="glyphicon glyphicon-search"></span> 搜索</button>
            </div>
        </div>
    </form>
</div>
<div class="clearfix"></div>
<div class="table-margin">
    <table class="table table-bordered table-header" id="list-table">
        <thead>
        <tr>
            <td>注册日期</td>
            <td>患病编号</td>
            <td>姓名</td>
            <td>年龄</td>
            <td>电话</td>
            <td>身份证号</td>
            <td>患病时间</td>
            <td>家庭住址</td>
            <td>次数</td>
            <td class="w6">操作</td>
        </tr>
        </thead>
        <tbody>
        {foreach name="list" item="vo"}
        <tr>
            <td>{$vo['register_time']}</td>
            <td>{$vo['id']}</td>
            <td>{$vo['name']}</td>
            <td>{$vo['age']}</td>
            <td>{$vo['phone']}</td>
            <td>{$vo['user_name']}</td>
            <td>{$vo['in_time']}</td>
            <td>{$vo['address']}</td>
            <td>{$vo['number']}</td>
            <td>
                <a href="{:url('record/record','id='.$vo['id'])}">
                    <button class="btn btn-info btn-sm">详情</button>
                </a>
            </td>
        </tr>
        {/foreach}
        </tbody>
        <tfoot>
        <tr>
            <td colspan="10">
                <div class="pull-right">
                    <nav>
                        <ul class="pagination">{$list->render()}</ul>
                    </nav>
                </div>
            </td>
        </tr>
        </tfoot>
    </table>
</div>
<script type="text/javascript">
    function userDel(id){
        layer.confirm('确认删除此游戏?', {icon: 3, title:'提示'}, function(index){
            //do something
            $.getJSON("{:url('user/userDel')}", {'id' : id}, function(res){
                if(1 == res.code){
                    layer.alert(res.msg, {title: '友情提示', icon: 1, closeBtn: 0}, function(){
                        window.location.reload();
                    });
                }else{
                    layer.alert(res.msg, {title: '友情提示', icon: 2});
                }
            });
            layer.close(index);
        })
    }
</script>
{/block}